<div class="main">
    <div class="main-header">
        <div class="pa-icon-div pull-left" style="color:black">
            <i class="fa fa-home"></i>
            <span>内业>安全活动><span style="color:#008bdd">安全活动列表</span></span>
        </div>
        <div class="pa-icon-div pull-right">
            <i class="fa fa-reply-all"></i>
            <span>返回</span>
        </div>
    </div>
    <div class="main-content">
        <form class="base-info">
            <div class="query-info">
                <div class="first-search">
                    <div class="input-group">
                        <input type="text" class="search-combobox-input" placeholder="活动名称">
                        <span class="input-group-btn">
                          <i class="fa fa-search icon-search"></i>
                        </span>
                    </div>
                    <div class="pa-operate">
                        <i class="fa fa-refresh"></i>
                        <span>刷新</span>
                    </div>
                    <div class="pa-act-register" ng-click="vm.data.isDown=!vm.data.isDown">
                        <i class="fa fa-edit"></i>
                        <span>活动登记</span>
                        <i class="fa" ng-class="{'fa-chevron-down':vm.data.isDown,'fa-chevron-up':!vm.data.isDown}"></i>
                        <div ng-show="vm.data.isDown" style="background-color: white;border: 1px solid #ddd;position: absolute; box-shadow: 3px 3px 3px #ddd;">
                            <p><a href="educationTrainingRegister.html">安全技术培训</a></p>
                            <p><a href="technicalClarificaiton.html">安全技术交底</a></p>
                            <p><a href="activityRegister.html">安全会议</a></p>
                        </div>
                    </div>
                </div>
            </div>
        </form>
        <div class="pa-table-container">
            <table class="pa-table">
                <thead>
                    <tr>
                        <th></th>
                        <th class="sort-operate">
                            <span>日期</span>
                            <div class="time-sequence-btn">
                                <div class="time-sequence-box" ng-class="{'active':data.queryInfo.isDateOrder}" ng-click="data.queryInfo.isDateOrder=!data.queryInfo.isDateOrder">
                                    <i class="fa fa-caret-up sort-size sort-size-big"></i>
                                </div>
                                <div class="time-sequence-box" ng-class="{'active':!data.queryInfo.isDateOrder}" ng-click="data.queryInfo.isDateOrder=!data.queryInfo.isDateOrder">
                                    <i class="fa fa-caret-down sort-size sort-size-small"></i>
                                </div>
                            </div>
                        </th>
                        <th>类型</th>
                        <th>活动名称</th>
                        <th>主讲人</th>
                        <th>部门</th>
                        <th>特种作业</th>
                        <th>状态</th>
                        <th class="operate-three">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="value in vm.data.list track by $index"
                    ng-click="vm.method.controlExpand($index)"
                    ng-show="$index%2 ==0 || vm.data.currentIndex == $index">
                        <td ng-if="$index%2 ==0">
                        <i class="fa" ng-class="{'fa-down': vm.data.currentIndex == $index,'fa-right':vm.data.currentIndex != $index}"></i>
                        </td>
                        <td ng-if="$index%2 ==0">{{value.field2||'-'}}</td>
                        <td ng-if="$index%2 ==0">{{value.field2||'-'}}</td>
                        <td ng-if="$index%2 ==0">{{value.field3||'-'}}</td>
                        <td ng-if="$index%2 ==0">{{value.field4||'-'}}</td>
                        <td ng-if="$index%2 ==0">{{value.field5||'-'}}</td>
                        <td ng-if="$index%2 ==0">{{value.field6||'-'}}</td>
                        <td ng-if="$index%2 ==0">{{value.field7||'-'}}</td>
                        <td ng-if="$index%2 ==0">
                            <div class="operate-del" ng-click="vm.method.goDetail(value)">
                                <i class="fa fa-pencil detail-color"></i>
                                <span>详情</span>
                            </div>
                            <div class="operate-del" ng-click="vm.method.goEdit(value)">
                                <i class="fa fa-pencil edit-color"></i>
                                <span>编辑</span>
                            </div>
                            <div class="operate-del" ng-click="vm.method.del($index)">
                                <i class="fa fa-trash trash-color"></i>
                                <span>删除</span>
                            </div>
                        </td>
                        <td colspan="9" style="width:100%" ng-if="$index%2 ==1">
                            <div class="text-left">
                                <span>附件名</span>
                                <a class="pa-sm-btn" ng-href="{{vm.getDownloadSrc(file.id)}}" download="{{file.fileName}}">下载</a>
                                <button class="pa-sm-btn reset-btn" ng-click="vm.method.preview(value)">预览</button>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
            <div>
                <div style="margin:20px 0;height:30px;display: inline-block;">共计<span style="color: #008bdd">{{vm.pagination.totalItems}}</span>条</div>
                <ul uib-pagination total-items="vm.pagination.totalItems"
                items-per-page="vm.pagination.ITEMS_PER_PAGE"
                ng-model="vm.pagination.currentPage" ng-change="vm.pagination.pageChanged()" max-size="vm.pagination.maxSize" next-text="下一页" previous-text="上一页" class="pagination-sm pull-right" boundary-link-numbers="true" rotate="true"
                force-ellipses="true"></ul>
            </div>
        </div>
    </div>
</div>
